<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/static/crm/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/crm/css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>

<body>
    <form class="layui-form" action="">
        <div class="layui-form layuimini-form">
            <fieldset class="table-search-fieldset" style="border: 3px solid rgb(75, 75, 75);">
                <legend style="color: rgb(75, 75, 75);">基本信息</legend>
                <div class="layui-form-item">
                    <label class="layui-form-label ">客户名称：</label>
                    <div class="layui-input-block">
                        <input type="text" name="name" lay-verify="required" value="" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label ">联系电话：</label>
                    <div class="layui-input-block">
                        <input type="text" name="landline" value="" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label ">联系手机：</label>
                    <div class="layui-input-block">
                        <input type="text" name="phone" lay-verify="required" value="" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">客户级别：</label>
                    <div class="layui-input-block">
                        <select name="grade" lay-ignore>
                            <option value="普通客户">普通客户</option>
                            <option value="重要客户">重要客户</option>
                            <option value="优质客户">优质客户</option>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">客户行业：</label>
                    <div class="layui-input-block">
                        <select name="industry" lay-ignore>
                            <option value="其他">其他</option>
                            <option value="房地产">房地产</option>
                            <option value="金融业">金融业</option>
                            <option value="商业服务">商业服务</option>
                            <option value="贸易">贸易</option>
                            <option value="运输物流">运输物流</option>
                            <option value="服务业">服务业</option>
                            <option value="文化传媒">文化传媒</option>
                            <option value="IT/互联网">IT/互联网</option>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">客户来源：</label>
                    <div class="layui-input-block">
                        <select name="source" lay-ignore>
                            <option value="个人资源">个人资源</option>
                            <option value="广告">广告</option>
                            <option value="转介绍">转介绍</option>
                            <option value="搜索引擎">搜索引擎</option>
                            <option value="公司资源">公司资源</option>
                            <option value="电话咨询">电话咨询</option>
                            <option value="官网咨询">官网咨询</option>
                            <option value="公众号">公众号</option>
                            <option value="抖音">抖音</option>
                            <option value="企业微信">企业微信</option>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label ">客户标签：</label>
                    <div class="layui-input-block">
                        <input type="text" name="label" value="" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">  
                    <div class="layui-form-item" id="area-picker">
                        <label class="layui-form-label ">地址：</label>
                        <!-- <div class="layui-input-inline" style="width: 200px;">
                            <select name="province" class="province-selector" data-value="广东省" lay-filter="province-1">
                                <option value="">请选择省</option>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="width: 200px;">
                            <select name="city" class="city-selector" data-value="深圳市" lay-filter="city-1">
                                <option value="">请选择市</option>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="width: 200px;">
                            <select name="county" class="county-selector" data-value="龙岗区" lay-filter="county-1">
                                <option value="">请选择区</option>
                            </select>
                        </div> -->
                        <div class="layui-input-block">
                            <input type="text" name="address" value="" class="layui-input">
                        </div>
                    </div>
                </div>
        
        <div class="layui-form-item">
            <label class="layui-form-label ">详细地址：</label>
            <div class="layui-input-block">
                <input type="text" name="detailed" value="" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">下次跟进时间：</label>
            <div class="layui-input-inline">
                <input name="follow_time" type="text" class="layui-input" id="test12" placeholder="">
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注：</label>
            <div class="layui-input-block">
                <textarea name="remark" class="layui-textarea" placeholder="请输入备注信息"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
        </fieldset>
        </div>
    </form>
</div>




<script src="/static/crm/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="/static/crm/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
    <script>
        layui.use(['form', 'laydate', 'jquery','layarea'], function () {
            var form = layui.form,
                layer = layui.layer,
                laydate = layui.laydate,
                layarea = layui.layarea,
                $ = layui.jquery;

            laydate.render({
                elem: '#test12'
            });

            //地区
            // layarea.render({
            //     elem: '#area-picker',
            //     // data: {
            //     //     province: '广东省',
            //     //     city: '深圳市',
            //     //     county: '龙岗区',
            //     // },
            //     change: function (res) {
            //         //选择结果
            //         console.log(res);
            //     }
            // });

            form.on('submit(formDemo)', function (data) {
                $.ajax({
                    url: 'data',
                    type: 'post',
                    dataType: 'json',
                    data: data.field,
                    success: function (data) {
                        if (data.code == 1) {
                            layer.msg(data.msg, {
                                time: 1500,
                                end: function () {
                                    var iframeIndex = parent.layer.getFrameIndex(window.name);
                                    parent.layer.close(iframeIndex);
                                }
                            });

                        } else if (data.code == 0) {
                            layer.msg(data.msg);
                        }
                    }
                })
                return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
            });

        });
    </script>
</body>

</html>